#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

const string opers = "+-*/%";

enum Rcode
{
    Div_zero = 1,
    Mod_zero,
    unknow
};

class Task
{
public:
    Task()
    {}
    Task(int data1, int data2, char oper)
        : _data1(data1), _data2(data2), _oper(oper), _result(0), _rcode(0)
    {
    }

    void run()
    {
        switch (_oper)
        {
        case '+':
            _result = _data1 + _data2;
            break;
        case '-':
            _result = _data1 - _data2;
            break;
        case '*':
            _result = _data1 * _data2;
            break;
        case '/':
            if (_data2 == 0)
                _rcode = Div_zero;
            else
                _result = _data1 / _data2;
            break;
        case '%':
            if (_data2 == 0)
                _rcode = Mod_zero;
            else
                _result = _data1 % _data2;
            break;
        default:
            _rcode = unknow;
            break;
        }
    }

    string GetRet()
    {
        string r = to_string(_data1);
        r += _oper;
        r += to_string(_data2);
        r += " = ";
        r += to_string(_result);
        r += "[code = ";
        r += to_string(_rcode);
        r += "]";
        return r;
    }
    string Getinfo()
    {
        string r = to_string(_data1);
        r += _oper;
        r += to_string(_data2);
        r += " = ?";
        return r;
    }
    ~Task()
    {
    }

private:
    int _data1;
    int _data2;
    char _oper;
    int _result;
    int _rcode;
};